import request from '/@/utils/request';

export const getWeekData = async () => {
    // 模拟返回近一周的产量
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve({
          quantity: 250,  // 假设近一周完成了250件
        });
      }, 1000);
    });
  };
  
  export const getPlanVsActualData = async () => {
    // 模拟返回近几周的计划产量和实际产量数据
    return new Promise((resolve) => {
      setTimeout(() => {
        request({
          url: '/api/BaseInformation/Station/UIProductOrderPageInfo',
          method: 'get',
          data: {
              // 'Type':queryType.value,
              // 'SN':queryInput.value
          }
      }).then(res => {
        resolve({
          weeks: res.date,  // 周次
          planned: res.weekPlan,  // 计划产量
          actual: res.weekQuantity,  // 实际产量
          weekcurrent :res.currentWeekOutput,
          OrderPlanQuantity:res.OrderPlanQuantity,
          orderOutput:res.OrderOutput,
          processData:res.stationDatas
        });
      })
        // resolve({
        //   weeks: ['Week 1', 'Week 2', 'Week 3', 'Week 4'],  // 周次
        //   planned: [300, 280, 320, 310],  // 计划产量
        //   actual: [250, 270, 310, 300],  // 实际产量
        // });
      }, 1000);
    });
  };
  